import request from '@/utils/request'

// 查询YmCoupon列表
export function listYmCoupon(query) {
  return request({
    url: '/api/v1/couponList',
    method: 'get',
    params: query
  })
}

// 查询YmCoupon详细
export function getYmCoupon(couponId) {
  return request({
    url: '/api/v1/coupon/' + couponId,
    method: 'get'
  })
}

// 新增YmCoupon
export function addYmCoupon(data) {
  return request({
    url: '/api/v1/coupon',
    method: 'post',
    data: data
  })
}

// 修改YmCoupon
export function updateYmCoupon(data) {
  return request({
    url: '/api/v1/coupon',
    method: 'put',
    data: data
  })
}

// 删除YmCoupon
export function delYmCoupon(couponId) {
  return request({
    url: '/api/v1/coupon/' + couponId,
    method: 'delete'
  })
}
export function UserCouponList(query) {
    console.log(query)
    console.log("dyj")
    return request({
        url: '/api/v1/user/couponList/'+query.phone,
        method: 'get',
        params: query
    })
}
